Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated usage of ImageCleaner #234

Merged
merged 3 commits into from Mar 27, 2019

Conversation

stansidel
Copy link
Contributor

DatasetFormatter.from_toplosses removed the ds_type parameter.
In order to clean the whole dataset we need to create a separate
one with all the images. This commit alters the notebook
to reflect the new approach.

Some students, including myself, ran into an issue when ImageCleaner
didn't render at all. This happens when using Jupyter Lab instead
of Jupyter Notebook. I've added the warning to the notebook as well.

It also fixes an issue with creating ImageDataBunch from cleaned.csv.
The first param was ".", the current folder, but should be path.
This commit fixes it.

DatasetFormatter.from_toplosses removed the `ds_type` parameter.
In order to clean the whole dataset we need to create a separate
one with all the images. This commit alters the notebook
to reflect the new approach.

Some students, including myself, ran into an issue when ImageCleaner
didn't render at all. This happens when using Jupyter Lab instead
of Jupyter Notebook. I've added the warning to the notebook as well.

It also fixes an issue with creating ImageDataBunch from `cleaned.csv`.
The first param was `"."`, the current folder, but should be `path`.
This commit fixes it.
Updated the name of the object due to the recent changes
to the library.
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"ds, idxs = DatasetFormatter().from_toplosses(learn, ds_type=DatasetType.Valid)"
"learn_cln = create_cnn(db, models.resnet34, metrics=error_rate)\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is called cnn_learner now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

"cell_type": "markdown",
"metadata": {},
"source": [
"Make sure you're running this notebook in Jupyter Notebook, not Jupyter Lab. That is accessible via https://localhost:8080/tree, not https://localhost:8080/lab. Running the `ImageCleaner` widget in Jupyter Lab is [not currently supported](https://github.com/fastai/fastai/issues/1539)."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is only the URL for some systems, but is not correct for all systems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the links to the relative ones (/lab and /tree). It should work in most cases, I think. Should I remove them altogether to be on the safe side?

* Updates `create_cnn` to `cnn_learner` as the name changed in the newer
     version of the library.
* Changes links to Notebook and Lab to more general ones (relative).
@jph00 jph00 merged commit 28c50f1 into fastai:master Mar 27, 2019
mattcallanan pushed a commit to mattcallanan/course-v3 that referenced this pull request Apr 2, 2019
* Updated usage of ImageCleaner

DatasetFormatter.from_toplosses removed the `ds_type` parameter.
In order to clean the whole dataset we need to create a separate
one with all the images. This commit alters the notebook
to reflect the new approach.

Some students, including myself, ran into an issue when ImageCleaner
didn't render at all. This happens when using Jupyter Lab instead
of Jupyter Notebook. I've added the warning to the notebook as well.

It also fixes an issue with creating ImageDataBunch from `cleaned.csv`.
The first param was `"."`, the current folder, but should be `path`.
This commit fixes it.

* ImageItemList to ImageList

Updated the name of the object due to the recent changes
to the library.

* PR fixes

* Updates `create_cnn` to `cnn_learner` as the name changed in the newer
     version of the library.
* Changes links to Notebook and Lab to more general ones (relative).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants